# -*- coding:utf-8 -*-
import os,sys
import re
import traceback
import time
sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), os.pardir, os.pardir))
import supeanut_config
sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), os.pardir))
from CommonLib.mylog import mylog


'''
作者：supeanut
创建时间：2016-xx-xx xx:xx:xx
功能描述：
	xxx
	xxxxx
相关配置：
	supeanut_config.XXX
历史改动：
	2016-xx-xx: xxxxxx
'''
class Sample:
	# init what
	def __init__(self):
		self.param = supeanut_config.PARAM

	# func functions
	# input param
	# output param
	def func(self):
		# some states...
		# -some sub status...
		# --some sub_sub status...
		log = mylog('sample.func', None)
		for i in range(3):
			log.info('This is info')
			log.warning('This is warning')
			log.error('This is error')
			time.sleep(3)
			try:
				a = 1000/0.0
			except:
				log.exception("Exception Logged")
				exception_str = traceback.format_exc()


if __name__ == '__main__':
	obj = Sample()
	obj.func()
